import xml.dom.minidom
from xml.dom.minidom import Node

from sendable import * 
from title_sender import * 

class AlbumSender(Sendable):
	def __init__(self, album):
		self.album = album 
	def send(self):
		doc = xml.dom.minidom.Document()
		node = doc.createElement("album")
		node.setAttribute("name", self.album.name)
		for i in self.album.titles:
			snd = TitleSender(i)
			node.appendChild(snd.send())
		return node
